<template>
  <view>

    <!--活动-->
	<my-activities-list :list="actList"></my-activities-list>
    <!--活动-->

      <!--活动-->
     	<!--<view class=" cu-card article no-card">-->
     		<!--<view style="border-bottom: #e2e2e2 0.5upx solid;" class="cu-item shadow" @click="goDetailPage(index)" v-for="(item,index) in info" :key="index" >-->
     			<!--&lt;!&ndash;活动图片&ndash;&gt;-->
				<!--<view class="title">-->
					<!--<text class="text-cut" style="font-size: 120%;margin-left: 5upx;">{{item.title}}</text>-->
				<!--</view>-->
     			<!--<view class="content">-->
     				<!--<image :src="item.imgUrl"></image>-->
					<!--<view class="content">-->
						<!--<view class="text-content">{{item.desc}}</view>-->
					<!--</view>-->
     				<!--<view class="cu-tag bg-red light  round" v-if="item.hot==1">热门</view>-->
     			<!--</view>-->
     			<!--&lt;!&ndash;活动图片&ndash;&gt;-->
     		<!--</view>-->
     	<!--</view>-->
     	<!--活动-->

  </view>
</template>

<script>
import myActivitiesList from "../../../component/myActivitiesList";
export default {
  components: {
    myActivitiesList
  },
  data() {
    return {
      actList: [],
      info: [
        {
          hot: 0,
          title: "activate1",
          desc: "内容 A",
          type: "image",
          imgUrl:
            "http://39.106.100.179:9999/group1/M00/00/00/J2pks17AEOKAYqyeAAC1iBK7Cvg747.jpg",
          attention: 12,
          appreciacte: 14,
          like: 0,
          glance: 0,
          share: 0,
          url: "/pagesB/activitiesDetail/index"
        },
        {
          hot: 1,
          title: "activate2",
          desc: "内容 B",
          type: "image",
          imgUrl:
            "http://39.106.100.179:9999/group1/M00/00/00/J2pks17AENiAVXQKAAB0RlzUD-M097.jpg",
          attention: 134,
          appreciacte: 1132,
          like: 0,
          glance: 0,
          share: 0,
          url: "/pagesB/activitiesDetail/index"
        },
        {
          hot: 0,
          title: "activate3",
          desc: "内容 C",
          type: "image",
          imgUrl:
            "http://39.106.100.179:9999/group1/M00/00/00/J2pks17AEPmACJSxAAFPBRQXiLc408.jpg",
          attention: 14,
          appreciacte: 14,
          like: 0,
          glance: 0,
          share: 0,
          url: "/pagesB/activitiesDetail/index"
        }
      ]
    };
  },
  methods: {
    goDetailPage(index) {
      console.log(index);
      var url = this.info[index].url;
      if (url != null && url != undefined) {
        uni.navigateTo({
          url: url
        });
      }
    },
    getAct() {
      this.request({
        url:
          this.apiServer +
          "/activities/findMyActivities?uId=" +
          uni.getStorageSync("user").id +
          "&skip=0&limit=20"
      }).then(res => {
        console.log(res);
        this.actList = res.data;
        //this.actList.hot = 1;
      });
    }
  },
  mounted() {
    this.getAct();
  }
};
</script>

<style>
</style>